<template>
  <div>
    <catch-table :columns="columns" :api="api" :operation="false" :search-form="search"> </catch-table>
  </div>
</template>
<script lang="ts" setup>
import { ref } from 'vue'
import { getTaskStateText, TASK_STATE } from '@/views/dataCheck/dcTask/constants'
const api = 'log/behavior'
// table columns
const columns = [
  {
    prop: 'serial_number',
    label: '序号'
  },
  {
    prop: 'username',
    label: '操作人'
  },
  {
    prop: 'module',
    label: '模块'
  },
  {
    prop: 'business',
    label: '业务'
  },
  {
    prop: 'operation',
    label: '行为内容',
    width: '500'
  },
  {
    prop: 'operate_ip',
    label: '操作IP'
  },
  {
    prop: 'created_at',
    label: '操作时间'
  }
]
// table search
const search = [
  {
    type: 'input',
    name: 'module',
    label: '模块'
  },
  {
    type: 'input',
    name: 'business',
    label: '业务'
  },
  {
    type: 'select',
    name: 'creator_id',
    label: '操作人',
    api: 'admin'
  },
  {
    type: 'range',
    label: '操作时间',
    children: [
      {
        type: 'datetime',
        name: 'start_at',
        label: '开始时间',
        placeholder: '请选择开始时间'
      },
      {
        type: 'datetime',
        name: 'end_at',
        label: '结束时间',
        placeholder: '请选择结束时间'
      }
    ]
  }
]
</script>
